{% extends "administrator/base.html" %}

{% block mainbody %}                
    <h4>
        猫咪类别信息管理
    </h4>
    <table class="table table-bordered table-striped">
        <thead>
            <tr>
                <th>ID号</th>
                <th>类别名称</th>
                <th>父类别id</th>
                <th>路径</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for vo in typeslist %}
            <tr>
                <td>{{ vo.id }}</td>
                <td>{{ vo.pname}}|-- {{ vo.name }}</td>
                <td>{{ vo.pid }}</td>
                <td>{{ vo.path }}</td>
                <td width="30%">
                    <a href="{% url 'admin_type_add' vo.id %}" class="view-link">添加子类别</a>
                    <a href="{% url 'admin_type_del' vo.id %}" class="view-link">删除</a>
                    <a href="{% url 'admin_type_edit' vo.id %}" class="view-link">编辑</a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>                
{% endblock %}